﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_IPORT.Master" CodeBehind="Vessel_Log_Sheet_In.aspx.vb" Inherits="I_PORT.Vessel_Log_Sheet_In" 
    title="IRPC INTELLIGENT PORT SERVICE" %>
    
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/Control/Confirm.ascx" TagName="Confirm1" TagPrefix="Confirm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" language="javascript">
                    var _source;
    // keep track of the popup div
    var _popup;

    function showConfirm(customerid) {
        this._source = customerid;
        this._popup = $find('ModalPopupExtender3'); 
        this._popup.show();  
    }
       function okClick(){
        //  find the confirm ModalPopup and hide it
       this._popup.hide();

        __doPostBack(this._source.name,'');

    }
    function clickButton(e, buttonid) {

        var evt = e ? e : window.event;
        var bt = document.getElementById(buttonid);
        if (bt) {
            if (evt.keyCode == 13) {
                bt.click();
                return false;
            }
        }
    }
    function closeModalReject(type) {
           // document.getElementById('ctl00_contentplaceholder1_framePopup').src = 'about:blank';
        if (type == 'V')
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender7');
            mpu.hide();
            document.getElementById('ctl00_contentplaceholder1_btnRejectOK').click();
            }
            else
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender7');
            mpu.hide();
            }
           
        }
     function closeModal(type) {
           // document.getElementById('ctl00_contentplaceholder1_framePopup').src = 'about:blank';
            if (type == '@')
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender5');
            mpu.hide();
            document.getElementById('ctl00_contentplaceholder1_btnReLoad').click();
            }
           
        }
    function cancelClick(){
        //  find the confirm ModalPopup and hide it
        this._popup.hide();
    }
 </script>
 <style type="text/css">
    td.locked, th.locked {
position:relative;    
left:expression((this.parentElement.parentElement.parentElement.parentElement.scrollLeft-2)+'px');
}   
</style>
<asp:UpdatePanel ID="UpdatePanelMaster" runat="server">
   <ContentTemplate>
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
     <td>
        <asp:Panel ID="PanelBookingItem" runat="server">
          <table width="100%" border="0" cellpadding="2" cellspacing="0">
          <tr>
                 <td style="height:5px;"><img src="../Image/space.gif" /></td>
              </tr>
              <tr>
                <td colspan="2" align="center" >
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                   <tr>
                       <td valign="top">
                          <table width="100%" border="0" cellpadding="2" cellspacing="0">
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label62" runat="server" SkinID="lbtxt" Text="Booking No. :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtBookingVPS" runat="server" ></asp:TextBox>
                                </td>
                             </tr>
                              <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label72" runat="server" SkinID="lbtxt" Text="Product :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtProductSearch" runat="server" Width="80%" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label67" runat="server" SkinID="lbtxt" Text="Product L/D :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlProductLD" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">All</asp:ListItem>
                                       <asp:ListItem Value="L">Load</asp:ListItem>
                                       <asp:ListItem Value="D">Disch</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label68" runat="server" SkinID="lbtxt" Text="Destination :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDestinationSearch" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">All</asp:ListItem>
                                       <asp:ListItem Value="I">Domestic</asp:ListItem>
                                       <asp:ListItem Value="O">Foreign</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                              <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label66" runat="server" SkinID="lbtxt" Text="Plan Berth :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                  <asp:TextBox ID="txtPlanBerthFrom" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgPlanBerthFrom" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;-&nbsp;<asp:TextBox ID="txtPlanBerthTo" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgPlanBerthTo" runat="server" ImageUrl="~/Image/calendar.png" />
                                <asp:CalendarExtender ID="CalendarExtender4" runat="server" TargetControlID="txtPlanBerthFrom" Format="dd MMM yyyy" PopupButtonID="ImgPlanBerthFrom"></asp:CalendarExtender>
                                <asp:CalendarExtender ID="CalendarExtenderSerachPlan" runat="server" TargetControlID="txtPlanBerthTo" Format="dd MMM yyyy" PopupButtonID="ImgPlanBerthTo"></asp:CalendarExtender>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;">&nbsp;</td>
                                <td align="left">
                                    <asp:Button ID="btnSearchVPS" runat="server" Text="ค้นหา" CssClass="ButtonStyle" />
                                </td>
                             </tr>
                          </table>
                       </td>
                       <td valign="top">
                       <table width="100%" border="0" cellpadding="2" cellspacing="0">
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label65" runat="server" SkinID="lbtxt" Text="PORT :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlPORTVPS" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="0">All</asp:ListItem>
                                       <asp:ListItem Value="L">Liquid</asp:ListItem>
                                       <asp:ListItem Value="B">Bulk</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                              <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label56" runat="server" SkinID="lbtxt" Text="Ship's Name :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtShipVPS" runat="server" Width="80%" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                          <td style="width:100px;" align="right"><asp:Label ID="label69" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label70" runat="server" SkinID="lbtxt" Text="Lay Can :"></asp:Label>&nbsp;</td>
                         <td align="left"><asp:TextBox ID="txtDateSearch" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateSearch" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:Label ID="Label71" runat="server" SkinID="lbtxt" Text="TO"></asp:Label>&nbsp;<asp:TextBox ID="txtDateToSearch" runat="server" Width="80px"  onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateToSearch" runat="server"  ImageUrl="~/Image/calendar.png" />
                                <asp:CalendarExtender ID="CalendarExtenderSearch5" runat="server" TargetControlID="txtDateSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateSearch"></asp:CalendarExtender>
                                <asp:CalendarExtender ID="CalendarExtenderSearch6" runat="server" TargetControlID="txtDateToSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateToSearch" ></asp:CalendarExtender>
                              </td>
                           </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label57" runat="server" SkinID="lbtxt" Text="Status :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlStatusVPS" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">On Processing</asp:ListItem>
                                       <asp:ListItem Value="L">Waiting For PTMM</asp:ListItem>
                                       <asp:ListItem Value="U">Waiting For PTMMDAY</asp:ListItem>
                                       <asp:ListItem Value="S">Waiting For PTMMSEC</asp:ListItem>
                                       <asp:ListItem Value="T">Waiting For PTOL OR PTOB Approve</asp:ListItem>
                                       <asp:ListItem Value="J">Close Job</asp:ListItem>
                                       <asp:ListItem Value="C">Cancel</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                          </table>
                       </td>
                   </tr>
                </table>
                </td>
              </tr>
              <tr>
                 <td colspan="2" align="right">
                     <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                        <tr>
                          <td>&nbsp</td>
                          <td style="width:24px;"><img src="../Image/red.png" /></td>
                          <td style="width:90px;" align="left">&nbsp<asp:Label ID="Label34" runat="server" SkinID="lbtxt" Text="WAITING VERIFIED"></asp:Label></td>
                          <td style="width:24px;"><img src="../Image/green.png" /></td>
                          <td style="width:60px;" align="left">&nbsp<asp:Label ID="Label31" runat="server" SkinID="lbtxt" Text="RELEASED"></asp:Label></td>
                          <td style="width:24px;"><img src="../Image/comment.png" /></td>
                          <td style="width:90px;" align="left">&nbsp<asp:Label ID="Label32" runat="server" SkinID="lbtxt" Text="COMMENT"></asp:Label></td>
                          <td style="background-color:#A0CFEC;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="lb" runat="server" SkinID="lbtxt" Text="LOAD TO DOMESTIC"></asp:Label></td>
                          <td style="background-color:#6698FF;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label33" runat="server" SkinID="lbtxt" Text="LOAD TO FOREIGN"></asp:Label></td>
                          <td style="background-color:#52D017;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label34e" runat="server" SkinID="lbtxt" Text="DISCH FROM DOMESTIC"></asp:Label></td>
                          <td style="background-color:#347C17;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label39" runat="server" SkinID="lbtxt" Text="DISCH FROM FOREIGN"></asp:Label></td>
                          <td style="background-color:#FF0000;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label42" runat="server" SkinID="lbtxt" Text="CANCEL BOOKING"></asp:Label></td>
                        </tr>
                    </table>
                 </td>
              </tr>
              <tr>
                 <td style="height:5px;"><img src="../Image/space.gif" /></td>
              </tr>
              <tr>
                 <td colspan="2" align="center">
                 <asp:Panel ID="panelGridItem" runat="server" Width="900px" ScrollBars="Horizontal">
                                   <asp:GridView ID="gridItem" runat="server" SkinID="gridblue" DataKeyNames="Lay_Time,Status,Booking_Code,Booking_name,Vehicle_no,Vehicle_Text,Booking_no,Date_From,Date_To,MAgent_no,MAgent_name,SAgent_no,SAgent_name,MKT_Product,MKT_Custom,MKT_Finance,Booking_Date,Booking_Time,VPS_approve,MRI_approve,Marketing_approve,Vps_Acknowledge,MKT_Acknowledge,Remark_VPS,Remark_MRI,Vehicle_Destination,Vehicle_TypeBuy,Demurrage,Demurrage_Money,BunkerFO_Point,BunkerDO_Point,PORT,Confirm_Time,File_Upload,SELLER,BUYER,Product_Unit,Vehicle_LOA,Vehicle_CNTRY,Vehicle_DWT,Payin"
                                                AutoGenerateColumns="False">
                                                <PagerTemplate>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:ImageButton ID="ImgFirst" runat="server" Height="22px" ImageUrl="../Image/arrow-first.gif"
                                                                    OnCommand="Paginate" CommandArgument="First" CommandName="Page" />
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgBack" runat="server" Height="22px" ImageUrl="../Image/arrow-back.gif"
                                                                    OnCommand="Paginate" CommandArgument="Prev" CommandName="Page" />
                                                            </td>
                                                            <td valign="top">
                                                                Page
                                                                <asp:DropDownList ID="ddlPage" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                                of
                                                                <asp:Label ID="lbPageCount" runat="server" Text="Label"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgNext" runat="server" Height="22px" ImageUrl="../Image/arrow-next.gif"
                                                                    OnCommand="Paginate" CommandArgument="Next" CommandName="Page" />
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgEnd" runat="server" Height="22px" ImageUrl="../Image/arrow-end.gif"
                                                                    OnCommand="Paginate" CommandArgument="Last" CommandName="Page" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </PagerTemplate>
                                                <Columns>
                                                    <asp:TemplateField HeaderText="BOOKING NO." ItemStyle-Wrap="false" ItemStyle-CssClass="locked" >
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LinkBooking" runat="server" Text="<%# Bind('Booking_no') %>"
                                                                CommandArgument="<%# Container.DataItemIndex %>" CommandName="Edit"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                     <asp:BoundField HeaderText="Vessel NAME" DataField="Vehicle_Text" ItemStyle-Wrap="false" ItemStyle-CssClass="locked" />
                                                    <asp:BoundField HeaderText="Status" ItemStyle-Wrap="false" />
                                                    <asp:TemplateField HeaderText="Approve" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgApprove" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="LAY CAN/LAY DAY" DataField="Date_To" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="วันเวลา/จองเข้า" DataField="Lay_Time" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="LAY TIME" DataField="Lay_Time" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="เอกสารรายละเอียด" DataField="File_Upload" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="COMMODITY" DataField="Product_Name" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="QUANTITY" DataField="Product_Amount" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="UNIT" DataField="Product_Unit" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="BUYER" DataField="BUYER" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="SALLER" DataField="SELLER" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="Status" DataField="Status_Text" Visible="false" />
                                                    <asp:TemplateField HeaderText="Product" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgProduct" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Custom" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgCustom" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Finace" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgFinance" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="DEMURRAGE" DataField="Lay_Time" />
                                                    <asp:BoundField HeaderText="TERM" DataField="Lay_Time" />
                                                    <asp:TemplateField HeaderText="VPS" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgVPS" runat="server" /><asp:Image ID="imgVPSComment" runat="server"
                                                                ImageUrl="~/Image/comment.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="MRI" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgMRI" runat="server" /><asp:Image ID="imgMRIComment" runat="server"
                                                                ImageUrl="~/Image/comment.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="MKT" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgMKT" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="AGENT" DataField="MAgent_name" />
                                                    <asp:BoundField HeaderText="เทียบท่า" DataField="Wharf" />
                                                    <asp:BoundField HeaderText="วันเทียบ" DataField="Date_Wharf" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="TimeStart" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="Date_WharfEnd" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="TimeEnd" />
                                                    <asp:TemplateField HeaderText="Confirm" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgConfrim" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="REMAIN LAYTIME" />
                                                    <asp:BoundField HeaderText="REMARK" DataField="RemarkWharf" />
                                                    <asp:TemplateField HeaderText="" ItemStyle-Width="105px">
                                                        <ItemTemplate>
                                                            <asp:Button ID="btnDetail" runat="server" Text="Detail" CssClass="ButtonStyle" CommandArgument="<%# Container.DataItemIndex %>"
                                                                CommandName="Detail"  />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                            <asp:Timer ID="Timer1" Interval="300000" runat="server">
                                            </asp:Timer>
                 </asp:Panel>
                     <asp:Label ID="lbAlert" runat="server" Text="" Font-Names="Tahoma" style="color:Red; font-size:16px;"></asp:Label>
                 </td>
              </tr>
          </table>
        </asp:Panel>
        <asp:Panel ID="PanelLogSheet" runat="server" Visible="false">
          <asp:UpdatePanel ID="PanelTabLogSheet" runat="server" UpdateMode="Conditional">
             <ContentTemplate>
             <table width="100%" border="0" cellpadding="2" cellspacing="0">
                     <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
        <tr>
          <td align="center"><asp:Label ID="lbHeadVessel" runat="server" Text="VESSEL LOG SHEET" SkinID="lbHeadReport"></asp:Label></td>
        </tr>
         <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
        <tr>
          <td>
             <table width="100%" border="0" cellpadding="2" cellspacing="0">
                <tr>
                  <td align="right" style="width:150px;"><asp:Label ID="Label1" runat="server" SkinID="lbtxt" Text="NAME :"></asp:Label></td>
                  <td align="left" style="width:200px;"><asp:Label ID="lbName" runat="server" SkinID="lbtxt"></asp:Label></td>
                  <td align="right" style="width:150px;"><asp:Label ID="Label2" runat="server" SkinID="lbtxt" Text="C/S :"></asp:Label></td>
                  <td align="left" style="width:150px;"><asp:TextBox ID="txtCS" runat="server" Width="130px" MaxLength="50" ></asp:TextBox></td>
                  <td align="right" style="width:150px;"><asp:Label ID="Label3" runat="server" SkinID="lbtxt" Text="FLAG :"></asp:Label></td>
                  <td><asp:Label ID="lbFlag" runat="server" SkinID="lbtxt"></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                  <td align="right" style="width:150px;"><asp:Label ID="Label4" runat="server" SkinID="lbtxt" Text="DRAFT :FOR."></asp:Label></td>
                  <td align="left" style="width:200px;">
                     <asp:TextBox ID="txtDraftFor" runat="server" Width="100px" MaxLength="50" ></asp:TextBox>&nbsp;<asp:Label ID="Label29" runat="server" SkinID="lbtxt" Text="M" ></asp:Label>
                  </td>
                  <td align="right" style="width:150px;"><asp:Label ID="Label5" runat="server" SkinID="lbtxt" Text="AFT. :"></asp:Label></td>
                  <td align="left" style="width:150px;"><asp:TextBox ID="txtDraftAFT" runat="server" Width="100px" MaxLength="50" ></asp:TextBox>&nbsp;<asp:Label ID="lbDraftAFT" runat="server" SkinID="lbtxt" Text="M" ></asp:Label></td>
                  <td align="right" style="width:150px;"><asp:Label ID="Label6" runat="server" SkinID="lbtxt" Text="L.O.A. :"></asp:Label></td>
                  <td><asp:Label ID="lbLOA" runat="server" SkinID="lbtxt"></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                  <td align="right" style="width:150px;"><asp:Label ID="Label9" runat="server" SkinID="lbtxt" Text="DWT. :"></asp:Label></td>
                  <td align="left" style="width:200px;"><asp:Label ID="lbMaxDraft" runat="server" SkinID="lbtxt" ></asp:Label></td>
                  <td align="right" style="width:150px;"><asp:Label ID="Label43" runat="server" SkinID="lbtxt" Text="IMO No :"></asp:Label></td>
                  <td align="left" colspan="3" ><asp:TextBox ID="txtIMO" runat="server" Width="150px" MaxLength="50" ></asp:TextBox></td>
                </tr>
                <tr>
                  <td align="right" style="width:150px;"><asp:Label ID="Label7" runat="server" SkinID="lbtxt" Text="WHARF NO. :"></asp:Label></td>
                  <td align="left" style="width:200px;"><asp:Label ID="lbWharf" runat="server" SkinID="lbtxt" ></asp:Label>&nbsp;</td>
                  <td align="right" style="width:150px;"><asp:Label ID="Label8" runat="server" SkinID="lbtxt" Text="AGENT :"></asp:Label></td>
                  <td align="left" colspan="3" ><asp:Label ID="lbAgent" runat="server" SkinID="lbtxt" ></asp:Label>&nbsp;</td>
                </tr>
                 <tr id="rowShifting" runat="server" visible="false">
                  <td align="right" style="width:150px;"><asp:Label ID="lbHShifting" runat="server" SkinID="lbtxt" Text=""></asp:Label></td>
                  <td align="left"  colspan="5"><asp:Label ID="lbShifting" runat="server" SkinID="lbtxt" ></asp:Label>&nbsp;</td>
                </tr>
             </table>
          </td>
        </tr>
        <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
             </table>
             <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                  <td align="center" >
                    <table width="95%" border="0" cellpadding="0" cellspacing="0" >
                    <tr>
                       <td align="left">
             <asp:TabContainer ID="TabLogSheet" runat="server"  Width="100%" AutoPostBack="true"  
                               ActiveTabIndex="0" >
           <asp:TabPanel  ID="TabIn" runat="server">
               <HeaderTemplate>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vessel-In&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               </HeaderTemplate>
               <ContentTemplate>

               <table width="100%" border="0" cellpadding="0" cellspacing="0" >
         <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
        <tr>
           <td>
             <table width="100%" cellpadding="2" cellspacing="0" style="border: 1px solid #000000">
                <tr>
                   <td align="center"   style="border: 1px solid #000000; width:400px;"><asp:Label ID="Label10" runat="server" SkinID="lbtxt" Text="DESCRIPTION"></asp:Label></td>
                   <td align="center" style="border: 1px solid #000000;width:250px;"><asp:Label ID="Label11" runat="server" SkinID="lbtxt" Text="DATE/TIME VALUE"></asp:Label></td>
                   <td align="center" style="border: 1px solid #000000;"><asp:Label ID="Label12" runat="server" SkinID="lbtxt" Text="NOTE"></asp:Label></td>
                </tr>
                <tr>
                   <td align="left"   style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label13" runat="server" SkinID="lbtxt" Text="Commence Communication"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtCommence" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgCommence" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimeCommence" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender3" runat="server" 
                           TargetControlID="txtCommence" Format="dd MMM yyyy" 
                           PopupButtonID="ImgCommence" Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtTimeCommence"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left" CultureAMPMPlaceholder="" 
                           CultureCurrencySymbolPlaceholder="" CultureDateFormat="" 
                           CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" ></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkCommence" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label14" runat="server" SkinID="lbtxt" Text="Last Port of Call"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtLast" runat="server" Width="95%" MaxLength="500"  ></asp:TextBox>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkLast" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label15" runat="server" SkinID="lbtxt" Text="E.T.A. Information"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtETA" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgETA" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimeETA" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender2" runat="server" 
                           TargetControlID="txtETA" Format="dd MMM yyyy" PopupButtonID="imgETA" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtTimeETA"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkETA" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label55" runat="server" SkinID="lbtxt" Text="Estimate NOR"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtNor" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgNOr" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtNOrTime" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtenderNOR" runat="server" 
                           TargetControlID="txtNor" Format="dd MMM yyyy" PopupButtonID="imgNOr" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtenderNor" runat="server" TargetControlID="txtNOrTime"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="TextBox4" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label16" runat="server" SkinID="lbtxt" Text="Start of Port's Radar Control"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtStart" runat="server" Width="95%" MaxLength="500" ></asp:TextBox>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkStart" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label17" runat="server" SkinID="lbtxt" Text="Anchor Time"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtAnchor" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgAnchor" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimeAnchor" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender5" runat="server" 
                           TargetControlID="txtAnchor" Format="dd MMM yyyy" PopupButtonID="imgAnchor" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="txtTimeAnchor"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkAnchor" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label18" runat="server" SkinID="lbtxt" Text="Position "></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtPosition" runat="server" Width="95%" MaxLength="500" ></asp:TextBox>&nbsp;
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkPosition" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label21" runat="server" SkinID="lbtxt" Text="Tug / Roping Boat's Name "></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtTugRoping" runat="server" Width="95%" MaxLength="500" ></asp:TextBox>&nbsp;
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtTugRopingRemark" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;">
                     <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="left">
                          <asp:Label ID="Label19" runat="server" SkinID="lbtxt" Text="Pilot No."></asp:Label>&nbsp;<asp:TextBox ID="txtPilot" runat="server" Width="45px" ></asp:TextBox>
                          </td>
                          <td align="left">
                          <asp:Label ID="Label23" runat="server" SkinID="lbtxt" Text="P.O.B."></asp:Label>
                          </td>
                        </tr>
                     </table>
                   </td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtPOB" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgPOB" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimePOB" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender7" runat="server" 
                           TargetControlID="txtPOB" Format="dd MMM yyyy" PopupButtonID="imgPOB" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender7" runat="server" TargetControlID="txtTimePOB"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkPOB" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label54" runat="server" SkinID="lbtxt" Text="Anchor Up"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtUpdate" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgup" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtupTime" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtenderup" runat="server" 
                           TargetControlID="txtUpdate" Format="dd MMM yyyy" PopupButtonID="imgup" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtenderup" runat="server" TargetControlID="txtupTime"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="TextBox3" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label58" runat="server" SkinID="lbtxt" Text="Schedule (Up Date)"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtSchedule" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgSchedule" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimeSchedule" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender18" runat="server" 
                           TargetControlID="txtSchedule" Format="dd MMM yyyy" PopupButtonID="imgSchedule" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender18" runat="server" TargetControlID="txtTimeSchedule"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkSchedule" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label59" runat="server" SkinID="lbtxt" Text="Berthing Time (1th line - All fast)"></asp:Label><asp:Label ID="Red_Berthing" runat="server" ForeColor="Red" Text="*" ></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtBerthing" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgBerthing" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimeFromBerthing" runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;<asp:TextBox ID="txtTimeToBerthing" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender19" runat="server" 
                           TargetControlID="txtBerthing" Format="dd MMM yyyy" PopupButtonID="imgBerthing" 
                           Enabled="True"></asp:CalendarExtender>
               <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtTimeFromBerthing"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="txtTimeToBerthing"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder=""></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkBerthing" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
             </table>
           </td>
        </tr>
        <tr>
          <td>
             <asp:UpdatePanel ID="UpdatePanelTug" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
              <table width="100%" border="0" cellpadding="2" cellspacing="0" >
                <tr>
                   <td>
                   <asp:GridView ID="gridTug" runat="server" SkinID="gridblueNoPage" DataKeyNames="Tug_Event"
                     AutoGenerateColumns="False">
                     <Columns>
                         <asp:BoundField HeaderText="Tug Boat" DataField="Tug_Name" />
                         <asp:BoundField HeaderText="Start Time - End Time" DataField="Tug_Time" ItemStyle-HorizontalAlign="Center" />
                         <asp:BoundField HeaderText="Hrs." DataField="Hrs" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px"  />
                         <asp:BoundField />
                         <asp:BoundField HeaderText="Remark" DataField="Remark" ItemStyle-HorizontalAlign="Center"  />
                         <asp:TemplateField HeaderText="แก้ไข" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                 <asp:ImageButton ID="imgedit" CommandName="cmdedit" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" ImageUrl="~/Image/edit-24.gif" />
                             </ItemTemplate>
                         </asp:TemplateField>
                          <asp:TemplateField HeaderText="ลบ" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                 <asp:ImageButton ID="imgdelete" CommandName="cmddelete" CommandArgument="<%# Container.DataItemIndex %>" OnClientClick="showConfirm(this); return false;"  runat="server" ImageUrl="~/Image/cancel-24.gif" />
                             </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                    </asp:GridView>
                   </td>
                </tr>
                <tr>
                  <td>
                      <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="right" style="width:40px;"><asp:Label ID="Label60" runat="server" SkinID="lbtxt" Text="Tug :"></asp:Label>&nbsp;</td>
                          <td style="width:130px;">
                              <asp:TextBox ID="txtTug" runat="server" Width="120px"></asp:TextBox>
                              <asp:AutoCompleteExtender  runat="server" ID="AutoCompleteExtender1" BehaviorID="AutoCompleteEx2" CompletionInterval="50"
                     TargetControlID="txtTug" ServicePath="../WebService/AutoComplete_IPORT.asmx" MinimumPrefixLength="1" 
                    ServiceMethod="GetTug" CompletionListCssClass="autocomplete_completionListElement"
                CompletionListItemCssClass="autocomplete_listItem"
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" >
                <Animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteEx2');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".3">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteEx2')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".3">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteEx2')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                </Animations>
                 </asp:AutoCompleteExtender>
                          </td>
                          <td align="right" style="width:60px;"><asp:Label ID="Label20" runat="server" SkinID="lbtxt" Text="วันที่ :"></asp:Label>&nbsp;</td>
                          <td style="width:100px;">
                              <asp:TextBox ID="txtDate" runat="server" Width="70px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgDate" runat="server" ImageUrl="~/Image/calendar.png" />
                              <asp:CalendarExtender ID="CalendarExtender1" runat="server" 
                           TargetControlID="txtDate" Format="dd MMM yyyy" PopupButtonID="imgDate" 
                           Enabled="True"></asp:CalendarExtender>
                          </td>
                          <td align="right" style="width:60px;"><asp:Label ID="Label61" runat="server" SkinID="lbtxt" Text="เวลา :"></asp:Label>&nbsp;</td>
                          <td style="width:200px;">
                              <asp:TextBox ID="txtTimeFrom" runat="server" Width="35px"></asp:TextBox>-<asp:TextBox ID="txtTimeTo" runat="server" Width="35px"></asp:TextBox>&nbsp;<asp:DropDownList ID="ddlEvent" runat="server" SkinID="ddl"><asp:ListItem Value="W">Working</asp:ListItem><asp:ListItem Value="S">Stand By</asp:ListItem><asp:ListItem Value="P">Pilot Transport</asp:ListItem><asp:ListItem Value="O">Other</asp:ListItem><asp:ListItem Value="M">Mooring</asp:ListItem></asp:DropDownList>
                           <asp:MaskedEditExtender ID="MaskedEditExtender6" runat="server" TargetControlID="txtTimeFrom"
                           Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True"></asp:MaskedEditExtender>
                           <asp:MaskedEditExtender ID="MaskedEditExtender8" runat="server" TargetControlID="txtTimeTo"
                           Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True"></asp:MaskedEditExtender>    
                          </td>
                          <td align="right" style="width:70px;"><asp:Label ID="Label63" runat="server" SkinID="lbtxt" Text="Remark :"></asp:Label>&nbsp;</td>
                          <td style="width:100px;">
                              <asp:TextBox ID="txtRemarkTug" runat="server" Width="90px"></asp:TextBox></td>
                          <td align="left">
                              <asp:Button ID="btnTug" runat="server" Text="เพิ่ม Tug" Width="70px" CssClass="ButtonStyle" /></td>
                        </tr>
                      </table>
                  </td>
                </tr>
             </table>
                </ContentTemplate>
             </asp:UpdatePanel>
          </td>
        </tr>
         <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
        <tr>
          <td>
             <table width="100%" border="0" cellpadding="2" cellspacing="0" >
              <tr>
                  <td style="width:140px;" valign="top" align="right"><asp:Label ID="Label64" runat="server" SkinID="lbtxt" Text="ADDITION NOTES :"></asp:Label>&nbsp;</td>
                   <td align="left">
                       <asp:TextBox ID="txtAddition" runat="server" TextMode="MultiLine" Width="95%" Height="50px" ></asp:TextBox>
                    </td>
                </tr>
                </table>
                <table width="100%" border="0" cellpadding="2" cellspacing="0" >
                 <tr>
                  <td colspan="2" valign="top" align="left">
                     <asp:Label ID="Label51" runat="server" SkinID="lbtxt" Text="SIGNATURE OF DUTY PORT OPERATION CONTROL :" ></asp:Label>&nbsp;<asp:Label 
                          ID="lbSIGNATURE" runat="server" SkinID="lbtxt" ></asp:Label>
                  </td>
                </tr>
                 <tr>
                     <td colspan="2" style="height:10px;"> <img src="../Image/space.gif" /></td>
                </tr>
                <tr>
                  <td style="width:140px;" align="right">&nbsp;</td>
                   <td align="left">
                       <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="ButtonStyle" />
                       <asp:Button ID="btnPrint" runat="server" Text="Print" CssClass="ButtonStyle" />
                       <asp:Button ID="btnBack" runat="server" Text="Back" CssClass="ButtonStyle" />
                    </td>
                </tr>
             </table>
          </td>
        </tr>
        <tr>
          <td style="height:10px;"> <img src="../Image/space.gif" /></td>
        </tr>
      </table>

               </ContentTemplate>
            </asp:TabPanel>
           <asp:TabPanel  ID="TebOut" runat="server" >
               <HeaderTemplate>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vessel-Out&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               </HeaderTemplate>
               <ContentTemplate>
               <table width="100%" border="0" cellpadding="0" cellspacing="0" >
         <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
        <tr>
           <td>
             <table width="100%" cellpadding="2" cellspacing="0" style="border: 1px solid #000000">
                <tr>
                   <td align="center"   style="border: 1px solid #000000; width:400px;"><asp:Label ID="Label44" runat="server" SkinID="lbtxt" Text="DESCRIPTION"></asp:Label></td>
                   <td align="center" style="border: 1px solid #000000;width:250px;"><asp:Label ID="Label45" runat="server" SkinID="lbtxt" Text="DATE/TIME VALUE"></asp:Label></td>
                   <td align="center" style="border: 1px solid #000000;"><asp:Label ID="Label46" runat="server" SkinID="lbtxt" Text="NOTE"></asp:Label></td>
                </tr>
                                <tr>
                   <td colspan="3">
                      <asp:GridView ID="gridProduct" SkinID="gridblueNoPageNoWidth" Width="100%" ShowHeader="false" DataKeyNames="Booking_no,LU_StartActual_Date,LU_StartActual_Time,LU_StopActual_Date,LU_StopActual_Time,Product_no,LU_Connect_Date,LU_Connect_From,LU_Connect_To,LU_Disconnect_Date,LU_Disconnect_From,LU_Disconnect_To"
                           runat="server"
                           AutoGenerateColumns="False">
                               <Columns>
                                  <asp:TemplateField>
                                     <ItemTemplate>
                                        <table width="100%" style=" background-image:url('../Image/Line_Accordion.gif'); background-repeat:repeat">
                                            <tr>
                                                <td align="left">
                                                   <asp:Label ID="lbHeadChangeEdit" runat="server" SkinID="lbHead"  Text="<%# Bind('Product_name') %>" ></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                          <table width="100%" cellpadding="2" cellspacing="0" style="border: 1px solid #2d9d1c">
 	                                        <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label363" runat="server" SkinID="lbtxt" Text="Access Time by Shore's man"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      &nbsp;
                                                  </td>
                                                  <td style="border: 1px solid #000000;">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label22" runat="server" SkinID="lbtxt" Text="Arm/Hose Connection"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                    <asp:TextBox ID="txtArmConnect" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imArmConnect" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtArmConnectFrom" runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;<asp:TextBox ID="txtArmConnectTo" runat="server" Width="40px"></asp:TextBox>
                                                     <asp:CalendarExtender ID="calendarArmConnect" runat="server" 
                                                          TargetControlID="txtArmConnect" Format="dd MMM yyyy" PopupButtonID="imArmConnect" 
                                                           Enabled="True"></asp:CalendarExtender>
                                                      <asp:MaskedEditExtender ID="MaskArmConnectFrom" runat="server" TargetControlID="txtArmConnectFrom"
                                                             Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" ></asp:MaskedEditExtender>
                                                      <asp:MaskedEditExtender ID="MaskArmConnectTo" runat="server" TargetControlID="txtArmConnectTo"
                                                             Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" ></asp:MaskedEditExtender>
                                                  </td>
                                                  <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkArmConnect" Width="95%" runat="server"></asp:TextBox></td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label24" runat="server" SkinID="lbtxt" Text="Commence Load / Discharge"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      <asp:Label ID="lbCommence" runat="server" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                  </td>
                                                  <td style="border: 1px solid #000000;">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label25" runat="server" SkinID="lbtxt" Text="Rate of Load / Discharge"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      &nbsp;
                                                  </td>
                                                  <td style="border: 1px solid #000000;">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label26" runat="server" SkinID="lbtxt" Text="Cargo Operation's Time"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      &nbsp;
                                                  </td>
                                                  <td style="border: 1px solid #000000;">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label27" runat="server" SkinID="lbtxt" Text="E.T.C."></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      <asp:Label ID="lbETC" runat="server" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                  </td>
                                                  <td style="border: 1px solid #000000;">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label28" runat="server" SkinID="lbtxt" Text="Completed Load / Discharge"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      <asp:Label ID="lbComplete" runat="server" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                  </td>
                                                  <td style="border: 1px solid #000000;">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label52" runat="server" SkinID="lbtxt" Text="Arm/Hose Disconnection"></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                    <asp:TextBox ID="txtArmDis" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgArmDis" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtArmDisFrom" runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;<asp:TextBox ID="txtArmDisTo" runat="server" Width="40px"></asp:TextBox>
                                                     <asp:CalendarExtender ID="CalendarArmDis" runat="server" 
                                                          TargetControlID="txtArmDis" Format="dd MMM yyyy" PopupButtonID="imgArmDis" 
                                                           Enabled="True"></asp:CalendarExtender>
                                                      <asp:MaskedEditExtender ID="MaskedEditExtender9" runat="server" TargetControlID="txtArmDisFrom"
                                                             Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" ></asp:MaskedEditExtender>
                                                      <asp:MaskedEditExtender ID="MaskedEditExtender10" runat="server" TargetControlID="txtArmDisTo"
                                                             Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" ></asp:MaskedEditExtender>
                                                  </td>
                                                  <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkArmDis" Width="95%" runat="server"></asp:TextBox></td>
                                            </tr>
                                            <tr>
                                                  <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label53" runat="server" SkinID="lbtxt" Text="E.T.D."></asp:Label></td>
                                                  <td  align="center" style="border: 1px solid #000000;width:250px;">
                                                      <asp:TextBox ID="txtETD" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgETD" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtETDTime" runat="server" Width="40px"></asp:TextBox>
                                                     <asp:CalendarExtender ID="CalendarETD" runat="server" 
                                                          TargetControlID="txtETD" Format="dd MMM yyyy" PopupButtonID="imgETD" 
                                                           Enabled="True"></asp:CalendarExtender>
                                                      <asp:MaskedEditExtender ID="MaskedEditExtender11" runat="server" TargetControlID="txtETDTime"
                                                             Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" ></asp:MaskedEditExtender>
                                                  </td>
                                                  <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkETD" Width="95%" runat="server"></asp:TextBox></td>
                                            </tr>
		                                 </table>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                         </Columns>
                                                                        </asp:GridView>
                   </td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;">
                     <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="left">
                          <asp:Label ID="Label30" runat="server" SkinID="lbtxt" Text="Pilot No."></asp:Label>&nbsp;<asp:TextBox ID="txtPilotOut" runat="server" Width="45px" ></asp:TextBox>
                          </td>
                          <td align="left">
                          <asp:Label ID="Label35" runat="server" SkinID="lbtxt" Text="P.O.B."></asp:Label>
                          </td>
                        </tr>
                     </table>
                   </td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtPOBOut" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgPOBOut" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimePOBOut" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender11" runat="server" 
                           TargetControlID="txtPOBOut" Format="dd MMM yyyy" PopupButtonID="imgPOBOut" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender14" runat="server" TargetControlID="txtTimePOBOut"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder="" ></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkPOBOut" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label36" runat="server" SkinID="lbtxt" Text="Tug / Roping Boat's Name "></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtTugRopingOut" runat="server" Width="95%" MaxLength="500" ></asp:TextBox>&nbsp;
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkTugRopingOut" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label37" runat="server" SkinID="lbtxt" Text="Last Line / Departure"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtLastLine" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgLastLine" runat="server" ImageUrl="~/Image/calendar.png" /><asp:TextBox ID="txtTimeLastLineFrom" runat="server" Visible="false" Width="40px" ></asp:TextBox>&nbsp;<asp:TextBox ID="txtTimeLastLine" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender12" runat="server" 
                           TargetControlID="txtLastLine" Format="dd MMM yyyy" PopupButtonID="imgLastLine" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender16" runat="server" TargetControlID="txtTimeLastLine"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder="" ></asp:MaskedEditExtender>
                    <asp:MaskedEditExtender ID="MaskedEditExtender12edcsFrom" runat="server" TargetControlID="txtTimeLastLineFrom"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder="" ></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkLastLine" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                 <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label38" runat="server" SkinID="lbtxt" Text="Next Port"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtNext" runat="server" Width="95%" MaxLength="500" ></asp:TextBox>&nbsp;
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkNext" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                   <td align="left"  style="border: 1px solid #000000;width:400px;"><asp:Label ID="Label40" runat="server" SkinID="lbtxt" Text="End of Port's Radar Control"></asp:Label></td>
                   <td  align="center" style="border: 1px solid #000000;width:250px;">
                   <asp:TextBox ID="txtEnd" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgEnd" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtTimeEnd" runat="server" Width="40px"></asp:TextBox>
                  <asp:CalendarExtender ID="CalendarExtender13" runat="server" 
                           TargetControlID="txtEnd" Format="dd MMM yyyy" PopupButtonID="imgEnd" 
                           Enabled="True"></asp:CalendarExtender>
                  <asp:MaskedEditExtender ID="MaskedEditExtender17" runat="server" TargetControlID="txtTimeEnd"
                  Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True" 
                           CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                           CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                           CultureThousandsPlaceholder="" CultureTimePlaceholder="" ></asp:MaskedEditExtender>
                   </td>
                   <td style="border: 1px solid #000000;"><asp:TextBox ID="txtRemarkEnd" Width="95%" runat="server"></asp:TextBox></td>
                </tr>
              </table>
           </td>
        </tr>
        <tr>
          <td>
             <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
              <table width="100%" border="0" cellpadding="2" cellspacing="0" >
                <tr>
                   <td>
                   <asp:GridView ID="gridTugOut" runat="server" SkinID="gridblueNoPage" DataKeyNames="Tug_Event"
                     AutoGenerateColumns="False">
                     <Columns>
                         <asp:BoundField HeaderText="Tug Boat" DataField="Tug_Name" />
                         <asp:BoundField HeaderText="Start Time - End Time" DataField="Tug_Time" ItemStyle-HorizontalAlign="Center" />
                         <asp:BoundField HeaderText="Hrs." DataField="Hrs" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px"  />
                         <asp:BoundField />
                         <asp:BoundField HeaderText="Remark" DataField="Remark" ItemStyle-HorizontalAlign="Center"  />
                         <asp:TemplateField HeaderText="แก้ไข" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                 <asp:ImageButton ID="imgedit" CommandName="cmdedit" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" ImageUrl="~/Image/edit-24.gif" />
                             </ItemTemplate>
                         </asp:TemplateField>
                          <asp:TemplateField HeaderText="ลบ" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                 <asp:ImageButton ID="imgdelete" CommandName="cmddelete" CommandArgument="<%# Container.DataItemIndex %>" OnClientClick="showConfirm(this); return false;"  runat="server" ImageUrl="~/Image/cancel-24.gif" />
                             </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                    </asp:GridView>
                   </td>
                </tr>
                <tr>
                  <td>
                      <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="right" style="width:40px;"><asp:Label ID="Label41" runat="server" SkinID="lbtxt" Text="Tug :"></asp:Label>&nbsp;</td>
                          <td style="width:130px;">
                              <asp:TextBox ID="txtTugOut" runat="server" Width="120px"></asp:TextBox>
                              <asp:AutoCompleteExtender  runat="server" ID="AutoCompleteExtender2" BehaviorID="AutoCompleteExOut" CompletionInterval="50"
                     TargetControlID="txtTugOut" ServicePath="../WebService/AutoComplete_IPORT.asmx" MinimumPrefixLength="1" 
                    ServiceMethod="GetTug" CompletionListCssClass="autocomplete_completionListElement"
                CompletionListItemCssClass="autocomplete_listItem"
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" >
                <Animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteExOut');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".3">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteExOut')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".3">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteExOut')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                </Animations>
                 </asp:AutoCompleteExtender>
                          </td>
                          <td align="right" style="width:60px;"><asp:Label ID="Label47" runat="server" SkinID="lbtxt" Text="วันที่ :"></asp:Label>&nbsp;</td>
                          <td style="width:100px;">
                              <asp:TextBox ID="txtDateOut" runat="server" Width="70px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgDateOut" runat="server" ImageUrl="~/Image/calendar.png" />
                              <asp:CalendarExtender ID="CalendarExtender14" runat="server" 
                           TargetControlID="txtDateOut" Format="dd MMM yyyy" PopupButtonID="imgDateOut" 
                           Enabled="True"></asp:CalendarExtender>
                          </td>
                          <td align="right" style="width:60px;"><asp:Label ID="Label48" runat="server" SkinID="lbtxt" Text="เวลา :"></asp:Label>&nbsp;</td>
                          <td style="width:180px;">
                              <asp:TextBox ID="txtTimeFromOut" runat="server" Width="35px"></asp:TextBox>-<asp:TextBox ID="txtTimeToOut" runat="server" Width="35px"></asp:TextBox>&nbsp;<asp:DropDownList ID="ddlEventOut" runat="server" SkinID="ddl"><asp:ListItem Value="W">Working</asp:ListItem><asp:ListItem Value="S">Stand By</asp:ListItem><asp:ListItem Value="P">Pilot Transport</asp:ListItem><asp:ListItem Value="O">Other</asp:ListItem><asp:ListItem Value="M">Mooring</asp:ListItem></asp:DropDownList>
                           <asp:MaskedEditExtender ID="MaskedEditExtender19" runat="server" TargetControlID="txtTimeFromOut"
                           Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True"></asp:MaskedEditExtender>
                           <asp:MaskedEditExtender ID="MaskedEditExtender20" runat="server" TargetControlID="txtTimeToOut"
                           Mask="99:99" MaskType="Time" AcceptNegative="Left"  Enabled="True"></asp:MaskedEditExtender>    
                          </td>
                          <td align="right" style="width:70px;"><asp:Label ID="Label49" runat="server" SkinID="lbtxt" Text="Remark :"></asp:Label>&nbsp;</td>
                          <td style="width:100px;">
                              <asp:TextBox ID="txtRemarkTugOut" runat="server" Width="90px"></asp:TextBox></td>
                          <td align="left">
                              <asp:Button ID="btnTugOut" runat="server" Text="เพิ่ม Tug" CssClass="ButtonStyle" /></td>
                        </tr>
                      </table>
                  </td>
                </tr>
             </table>
                </ContentTemplate>
             </asp:UpdatePanel>
          </td>
        </tr>
         <tr>
          <td style="height:5px;"> <img src="../Image/space.gif" /></td>
        </tr>
        <tr>
          <td>
             <table width="100%" border="0" cellpadding="2" cellspacing="0" >
              <tr>
                  <td style="width:140px;" valign="top" align="right"><asp:Label ID="Label50" runat="server" SkinID="lbtxt" Text="ADDITION NOTES :"></asp:Label>&nbsp;</td>
                   <td align="left">
                       <asp:TextBox ID="txtAdditionOut" runat="server" TextMode="MultiLine" Width="95%" Height="50px" ></asp:TextBox>
                    </td>
                </tr>
                </table>
                <table width="100%" border="0" cellpadding="2" cellspacing="0" >
                <tr>
                  <td colspan="2" valign="top" align="left">
                     <%--<asp:Label ID="lbSignal" runat="server" SkinID="lbtxt" Text="SIGNATURE OF DUTY PORT OPERATION CONTROL :" ></asp:Label>&nbsp;<asp:Label 
                          ID="lbSIGNATUREOut" runat="server" SkinID="lbtxt" ></asp:Label>--%>
                          <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                                                                     <tr>
                                                                        <td style="width:50px;">&nbsp;</td>
                                                                        <td align="left">
                                                                            <asp:Literal ID="LiStatus" runat="server"></asp:Literal>
                                                                        </td>
                                                                     </tr>
                                                                  </table>
                  </td>
                </tr>
                <tr>
                     <td colspan="2" style="height:10px;"> <img src="../Image/space.gif" /></td>
                </tr>
                <tr>
                  <td style="width:140px;" align="right">&nbsp;</td>
                   <td align="left">
                       <asp:Button ID="btnSaveOut" runat="server" Text="Save" CssClass="ButtonStyle" />
                       <asp:Button ID="btnPrintOut" runat="server" Text="Print" CssClass="ButtonStyle" />
                       <asp:Button ID="btnBackOut" runat="server" Text="Back" CssClass="ButtonStyle" />
                        <asp:Button ID="btnReject" runat="server" CssClass="ButtonStyle" Text="Reject" OnClientClick="return confirm('หลังจากทำการ Reject ระบบจะทำการย้อนสถานะกลับไปเริ่มต้น Input ข้อมูลใหม่!!');" />
                        <asp:Button ID="btnSend" runat="server" CssClass="ButtonStyle" Width="120px" Text="Input Complete" />
                       <asp:Button ID="btnCheck" runat="server" CssClass="ButtonStyle" Text="Chief Approve" />
                       <asp:Button ID="btnApprove" runat="server" CssClass="ButtonStyle" Text="Approve" />
                    </td>
                </tr>
             </table>
          </td>
        </tr>
        <tr>
          <td style="height:10px;"> <img src="../Image/space.gif" /></td>
        </tr>
      </table>
               </ContentTemplate>
               </asp:TabPanel>
           </asp:TabContainer>   
                       </td>
                    </tr>  
                    </table>
                  </td>
               </tr>
             </table>
             </ContentTemplate>
          </asp:UpdatePanel>
          
         </asp:Panel>
      </td>
    </tr>
 </table>
      <asp:Button ID="BtnTrigger" runat="server" Text="Button" style="display:none" />
                  <asp:Button ID="btnRejectOK" runat="server" style="display:none;" />
     <asp:Button ID="btnTempCancel" runat="server" Text="Button" Style="display: none;" />
     <asp:ModalPopupExtender ID="ModalPopupExtender3" BehaviorID="ModalPopupExtender3" runat="server" 
                                    OkControlID="ctl00_contentplaceholder1_ConfirmDelete_btnOk" 
                                    OnOkScript="okClick();" 
                                    CancelControlID="ctl00_contentplaceholder1_ConfirmDelete_btnNo"     
                                    OnCancelScript="cancelClick();" 
                                     BackgroundCssClass="Background" DropShadow="false" 
                                      PopupControlID="PanelConfirm" TargetControlID="BtnTrigger" >
        </asp:ModalPopupExtender>
         <asp:Button ID="btnPopupDetail" runat="server" Text="Button" style="display:none;" />
             <asp:Button ID="btnReLoad" runat="server" Text="Button" style="display:none;" />
              <asp:ModalPopupExtender ID="ModalPopupExtender5" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnPopupDetail" PopupControlID="PanelDetailPopup">
            </asp:ModalPopupExtender>
                                    <asp:ModalPopupExtender ID="ModalPopupExtender7" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnTempCancel" PopupControlID="PanelCancel">
            </asp:ModalPopupExtender>
                <asp:Panel ID="PanelCancel" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="CancelPopup" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
               <asp:Panel ID="PanelDetailPopup" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="IframeDetailPopup" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
    <asp:Panel ID="PanelConfirm" runat="server" style="display:none;">
       <Confirm:Confirm1 ID="ConfirmDelete" runat="server" ></Confirm:Confirm1>
    </asp:Panel>
   </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
